Skip to main content
Version: 4.0

Get Real-time Alarms

Path
http://{supOS ip:port}/open-api/supos/oodm/v2/alert/current
Query Parameter
Table 1. Query parameter description
ParameterTypeDescription
keyWordstringFuzzy match with the name or alias of object and object attribute.
prioritystringAlarm priority.
limitValuestringLImit value of conditions that trigger the alarm.
Response
  • 200: Successful.
    {
    "code" : 200,
    "data" : [ {
    "ackDatatimestamp" : 1614670680298, //alarm confirmation time
    "ackStatus" : 0, //alarm confirmation status. 0 means not confirmed and 1 means confirmed
    "ackUserName" : "Emma", //alarm confirmation person
    "alertName" : "uuidde2d4cfaf5af4abe830387fbfe3e0bbf",
    "alertType" : "EQ", //alarm condition. EQ=equal, LT=less than, LE=less and equal, GT=greater than, GE=greater and equal
    "description" : "this is test alarm",
    "disappearedDatatimestamp" : 1614583659860, //alarm cancellation time
    "fullName" : "10801uuidde2d4cfaf5af4abe830387fbfe3e0bbf", //instance alias + alarm alias
    "id" : 11111, //real-time alarm ID
    "newValue" : "11", //value when alarm is triggered
    "oldValue" : "9", //value before alarm is triggered
    "priority" : 5,
    "showName" : "a1", //alarm display name
    "source" : "instance1", //instance alias that triggers the alarm
    "sourcePropShowName" : "attribute1", //attribute name to which the alarm belongs
    "sourcePropertyName" : "attribute1", //attribute alias to which the alarm belongs
    "sourceShowName" : "instance1", //instance name that triggers the alarm
    "startDatatimestamp" : 1614583559860, //alarm start time
    "status" : 1,//alarm status. 1 means alarm is triggered and 0 means alarm cancelled
    "valType" : 0 //attribute type. 0=double, 1=float, 2=long, 3=int, 4=boolean and 5=string
    } ],
    "detail" : "string",
    "message" : "ok"
    }
  • 500: General internal error of OODM.
    {
    "code": 10001001,
    "data": {},
    "detail": "string",
    "message": "string"
    }

Set Real-time Value of Entity Instance

Path
http://{supOS ip:port}/open-api/supos/oodm/v2/attributes/current 
Request Body
[ { 
"attributeFullPath" : "system.t1.i1.system.p1", //template namespace.template alias.instance alias.attribute namespace.attribute alias
"value" : "666",
"dateTime" : "2021-04-06T16:00+08:00"
} ]
Response
  • 200: Successful.
    { 
    "code" : 200,
    "data" : [ {
    "ackDatatimestamp" : 1614670680298, //alarm confirmation time
    "ackStatus" : 0, //alarm confirmation status. 0 means not confirmed and 1 means confirmed
    "ackUserName" : "Emma", //alarm confirmation person
    "alertName" : "uuidde2d4cfaf5af4abe830387fbfe3e0bbf",
    "alertType" : "EQ", //alarm condition. EQ=equal, LT=less than, LE=less and equal, GT=greater than, GE=greater and equal
    "description" : "this is test alarm",
    "disappearedDatatimestamp" : 1614583659860, //alarm cancellation time
    "fullName" : "10801uuidde2d4cfaf5af4abe830387fbfe3e0bbf", //instance alias + alarm alias
    "id" : 11111, //real-time alarm ID
    "newValue" : "11", //value when alarm is triggered
    "oldValue" : "9", //value before alarm is triggered
    "priority" : 5,
    "showName" : "a1", //alarm display name
    "source" : "instance1", //instance alias that triggers the alarm
    "sourcePropShowName" : "attribute1", //attribute name to which the alarm belongs
    "sourcePropertyName" : "attribute1", //attribute alias to which the alarm belongs
    "sourceShowName" : "instance1", //instance name that triggers the alarm
    "startDatatimestamp" : 1614583559860, //alarm start time
    "status" : 1,//alarm status. 1 means alarm is triggered and 0 means alarm cancelled
    "valType" : 0 //attribute type. 0=double, 1=float, 2=long, 3=int, 4=boolean and 5=string
    } ],
    "detail" : "string",
    "message" : "ok"
    }
  • 400: General internal error of OODM.
    { 
    "code": 10001001,
    "data": {},
    "detail": "string",
    "message": "string"
    }

Get Real-time Data of Object Attribute

info

You can get up to 1000 attributes.

Path
http://{supOS ip:port}/open-api/supos/oodm/v2/attribute/current
Request Body
{
"inputs" : [ "system.t1.instance.system.p1" ] //template namespace.template alias.instance alias.attribute namespace.attribute alias
}
Response
  • 200: Successful.
    {
    "code" : 200,
    "data" : {
    "additionalProp1" : {
    "name" : "system.testExcel.Instance_53.system.p1",
    "status" : "0",
    "timeStamp" : 1614736757547,
    "value" : { }
    },
    "additionalProp2" : {
    "name" : "system.testExcel.Instance_53.system.p1",
    "status" : "0",
    "timeStamp" : 1614736757547,
    "value" : { }
    },
    "additionalProp3" : {
    "name" : "system.testExcel.Instance_53.system.p1",
    "status" : "0",
    "timeStamp" : 1614736757547,
    "value" : { }
    }
    },
    "detail" : "string",
    "message" : "ok"
    }
  • 500: General internal error of OODM.
    {
    "code": 10001001,
    "data": {},
    "detail": "string",
    "message": "string"
    }

Get History Data of Object Attribute

Path
http://{supOS ip:port}/open-api/supos/oodm/v2/attribute/histories
Request Body
{
"fill" : { //filter conditions of history data
"strategy" : "previous"
},
"groupBy" : { //grouping conditions of history data
"time" : "5s,1s"
},
"limit" : 1, //number of returned data
"offset" : 23, //start query after the set number of data
"order" : "DESC", //sorting rule
"select" : [ "system.testExcel.Instance_53.system.p1" ],
"where" : { //query conditions
"and" : {
"timestamp" : {
"ge" : "2021-03-04T05:04:11Z",
"gt" : "2021-03-04T05:04:11Z",
"le" : "2021-03-04T05:14:11Z",
"lt" : "2021-03-04T05:14:11Z"
}
}
}
}
Response
  • 200: Successful.
    {
    "code" : 200,
    "data" : {
    "results" : [ {
    "datas" : [ [ { } ] ],
    "fields" : [ "time" ],
    "function" : "first",
    "hasNext" : false,
    "name" : "system.testExcel.Instance_53.system.p1"
    } ]
    },
    "detail" : "string",
    "message" : "ok"
    }
  • 500: General internal error of OODM.
    {
    "code": 10001001,
    "data": {},
    "detail": "string",
    "message": "string"
    }

Execute Entity Instance Service

Path
http://{supOS ip:port}/open-api/supos/oodm/v2/template/{templateNamespace}/{templateName}/instance/{instanceName}/service/{serviceNamespace}/{serviceName}
Request Body
{
"propName" : "p1"
}
Response
  • 200: Successful.
    {
    "code" : 200,
    "data" : {
    "result" : 44
    },
    "detail" : "string",
    "message" : "ok"
    }
  • 500: General internal error of OODM.
    {
    "code": 10001001,
    "data": {},
    "detail": "string",
    "message": "string"
    }

Execute Form Template Service

Path
http://{supOS ip:port}/open-api/supos/oodm/v2/template/{templateNamespace}/{templateName}/service/{serviceNamespace}/{serviceName}
Request Body
{
"propName" : "p1"
}
Response
  • 200: Successful.
    {
    "code" : 200,
    "data" : {
    "result" : 44
    },
    "detail" : "string",
    "message" : "ok"
    }
  • 500: General internal error of OODM.
    {
    "code": 10001001,
    "data": {},
    "detail": "string",
    "message": "string"
    }